<?php
/**
 * 文章标签关联模型
 * @author caoge
 * @version 2012-7-15
 */
class ArticleTagRelationshipModel extends BaseModel{
	/**
	 * 根据文章ID获取文章所有标签名
	 * @param int $articleId
	 * @author caoge
	 * @version 2012-7-15
	 */
	public function getTagNameByArticleId($articleId){
		$sql = 'select a.id,a.tag_name from blog_article_tag as a left join 
				blog_article_tag_relationship as b on a.id=b.tag_id where 
				b.article_id='.$articleId;
		return $this->query($sql);
	}
	
	/**
	 * 根据标签ID查询有哪些文章，返回文章ID
	 * @param int $tagId
	 * @author caoge
	 * @version 2012-7-15
	 */
	public function getArticleIdByTagId($tagId){
		$sql = '';
		return $this->query($sql);
	}
}